﻿#region License
// (c) Garry McGlennon 2009
// 
// This project is made available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warrenty – Use at your own risk
// 
// View the project and the latest code at http://dnpframework.codeplex.com/
// 
// All other rights reserved.
// 
// blog: www.dotNetProfessional.com/blog/
#endregion
namespace dnp.ServiceModel.Configuration
{
    public class BusinessLayerFeatureDefinition
    {
        private bool _supportWCF;
        private string _targetDatabase = "SQL2005";
        private double _targetCLRVersion = 2.0;
        private bool _supportTIMEZone;
        private bool _addIsValidToEntity = true;

        /// <summary>
        /// Provide attributres and expose services as WCF services
        /// </summary>
        public bool SupportWCF
        {
            get { return _supportWCF; }
            set { _supportWCF = value; }
        }

        /// <summary>
        /// Define the SQL database, which is used to control which database scripts get executed.
        /// </summary>
        public string TargetDatabase
        {
            get { return _targetDatabase; }
            set { _targetDatabase = value; }
        }

        /// <summary>
        /// Define the Common Language Runtime to target, this is used to determine which language features can be used in scripts.
        /// </summary>
        public double TargetCLRVersion
        {
            get { return _targetCLRVersion; }
            set { _targetCLRVersion = value; }
        }

        /// <summary>
        /// When selected will record dates as their UTC (GMT) time equivilant. Also, the users time will be required
        /// on all services in order to support storage and retrieval of the correct times.
        /// </summary>
        public bool SupportTimeZone
        {
            get { return _supportTIMEZone; }
            set { _supportTIMEZone = value; }
        }

        /// <summary>
        /// Determins if an IsValid method is added to the entity definition. If selected the implemenation of the logic is performed in
        /// a method contained in the partial class.
        /// </summary>
        public bool AddIsValidToEntity
        {
            get { return _addIsValidToEntity; }
            set { _addIsValidToEntity = value; }
        }
    }
}
